﻿create proc sp_luugiatp
@dongia int,
@giabanle int,
@NgayLap date,
@barcode char(20)
as
declare @dem as int
select @dem=count(*) from DanhMucGiaTP where Barcode=@barcode
if(@dem=0)
	begin
	insert into DanhMucGiaTp(DonGia,giabanle,ngaylap,barcode)
	values(@dongia,@giabanle,@ngaylap,@barcode)
	select ErrCode=1
	end
else
	begin
	select ErrCode=0
	end